package com.edu.entity.shop;

import com.baomidou.mybatisplus.annotation.TableField;
import com.edu.entity.user.SysUser;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Comments {
    private Integer id;
    private Integer videoid;
    private Integer userid;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date commenttime;
    private String commentdetail;

    //mybatis plus忽略该属性和数据库的映射
    @TableField(exist = false)
    private SysUser user;

    public Comments() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getVideoid() {
        return videoid;
    }

    public void setVideoid(Integer videoid) {
        this.videoid = videoid;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Date getCommenttime() {
        return commenttime;
    }

    public void setCommenttime(Date commenttime) {
        this.commenttime = commenttime;
    }

    public String getCommentdetail() {
        return commentdetail;
    }

    public void setCommentdetail(String commentdetail) {
        this.commentdetail = commentdetail;
    }

    public SysUser getUser() {
        return user;
    }

    public void setUser(SysUser user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Comments{" +
                "id=" + id +
                ", videoid=" + videoid +
                ", userid=" + userid +
                ", commenttime=" + commenttime +
                ", commentdetail='" + commentdetail + '\'' +
                ", user=" + user +
                '}';
    }
}
